<?php
// +----------------------------------------------------------------------
// | INPHP
// | Copyright (c) https://inphp.cc All rights reserved.
// | 该文件源码由INPHP官方提供，使用协议以INPHP官方公告为准。
// +----------------------------------------------------------------------
// | 导航
// +----------------------------------------------------------------------
namespace app\cms\model;

use Inphp\Core\Db\PDO\Model;

class TagsModel extends Model
{
    protected string $tableName = "cms_tags";

    /**
     * 根据指定ID获取列表
     * @param string|null $tags
     * @return array
     */
    public static function getList(?string $tags): array
    {
        if (empty($tags)) {
            return [];
        }
        return self::emptyQuery()->whereIn("id", $tags)->orderBy("archives", "desc")->get();
    }
}